module.exports={
    sessionCheck:async(ctx,next)=>{
        //if(!ctx.session.username){
            //ctx.response.redirect('/login');
        //}else{
            //await next();
        //}
        if(ctx.isAuthenticated()){
            await next();

        }else{
            ctx.session.logInfo = "登陆账号异常，请重新登录";
            ctx.response.redirect('/login');
        }
    }
}